package com.sx.zongzhi.presenter;

import com.sx.zongzhi.MyApplication;
import com.sx.zongzhi.bean.AppealTypeBean;
import com.sx.zongzhi.modle.ApiManager;
import com.sx.zongzhi.net.BaseCallBack;
import com.sx.zongzhi.net.BaseResult;
import com.sx.zongzhi.view.IAppealTypeView;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by XZY on 2017/12/4.
 * 诉求服务类别
 */
public class AppealTypePest {

    private IAppealTypeView typeView;

    public AppealTypePest(IAppealTypeView typeView) {
        this.typeView=typeView;
    }


    public void getAppealTypeList(){
        Map<String,Object> map=new HashMap<>();
        map.put("sid", MyApplication.sid);

        new ApiManager().getAppealTypeList(map, new BaseCallBack<BaseResult<List<AppealTypeBean>>>() {
            @Override
            public void onSuccess(BaseResult<List<AppealTypeBean>> response) {
                typeView.getAppealTypeList(response.getData());
            }
            @Override
            public void onFailures(String message) {
                typeView.showError(message);
            }
        });
    }

}
